<template>
  <div class="water-fall">
    <!-- {{ waterList }} -->
    <el-row>
      <el-col v-for="(item, index) in list" :key="index" class="mb-10">
        <el-card shadow="hover" :body-style="{ padding: '0px' }">
          <img
            :style="{
              width: '100%'
            }"
            :src="item.src"
          />
          <div class="water-fall-title">
            <el-link
              class="water-fall-title-btn"
              :href="`/#/home/sketch/pic/${item.id}`"
              :underline="false"
              >{{ item.name }}</el-link
            >
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'

const props = defineProps<{
  list: any[]
}>()
</script>
<style lang="scss" scoped>
.water-fall {
  column-count: 4; // 列的个数为4
  // column-width: 200px; // 宽度200px
  column-gap: 10px; // 列之间间隔2px
  margin: 10px;
  .water-fall-title {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .water-fall-title-btn {
      padding: 3px 0px;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
      .el-link__inner {
        display: inline !important;
      }
    }
    .el-link {
      display: inline !important;
    }
  }
}
</style>
